package xyz.jfshare.netty.study.client.pojo;

import java.sql.Timestamp;
import java.util.Objects;

/**
 * @author YuJie_Jin
 * Description: 好友
 */
public class Friend {
    /** id主键 */
    private Integer id;
    /** 用户id */
    private Integer userId;
    /** 好友id */
    private Integer friendId;
    /** 创建时间 */
    private Timestamp createTime;
    /** 修改时间 */
    private Timestamp updateTime;
    /** 是否删除 1:已删除 0:未删除 */
    private Integer isDelete;

    @Override
    public String toString() {
        return "Friend{" +
                "id=" + id +
                ", userId=" + userId +
                ", friendId=" + friendId +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", isDelete=" + isDelete +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Friend)) return false;
        Friend friend = (Friend) o;
        return Objects.equals(getId(), friend.getId()) &&
                Objects.equals(getUserId(), friend.getUserId()) &&
                Objects.equals(getFriendId(), friend.getFriendId()) &&
                Objects.equals(getCreateTime(), friend.getCreateTime()) &&
                Objects.equals(getUpdateTime(), friend.getUpdateTime()) &&
                Objects.equals(getIsDelete(), friend.getIsDelete());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId(), getUserId(), getFriendId(), getCreateTime(), getUpdateTime(), getIsDelete());
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getFriendId() {
        return friendId;
    }

    public void setFriendId(Integer friendId) {
        this.friendId = friendId;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }
}
